﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pibby.Core
{
	public enum IdentifiableProgressStatus
	{
		Unknown,
		Starting,
		Complete,
		Error
	}

	public class IdentifiableProgressTag
	{
		public IdentifiableProgressTag(string id)
			: this(id, IdentifiableProgressStatus.Complete)
		{
		}

		public IdentifiableProgressTag(string id, IdentifiableProgressStatus status)
		{
			this.Id = id;
			this.Status = status;
		}

		public IdentifiableProgressTag(string id, IdentifiableProgressStatus status, string content, string message)
		{
			this.Id = id;
			this.Status = status;
			this.Content = content;
			this.Message = message;
		}

		public IdentifiableProgressTag(string id, Exception ex)
		{
			this.Id = id;
			this.Status = IdentifiableProgressStatus.Error;
			this.Exception = ex;
		}

		public string Id
		{
			get;
			private set;
		}

		public IdentifiableProgressStatus Status
		{
			get;
			private set;
		}

		public string Content
		{
			get;
			private set;
		}

		public string Message
		{
			get;
			private set;
		}

		public Exception Exception
		{
			get;
			private set;
		}
	}
}
